using System;
using Castle.Windsor;
using KenEgozi.Com.Weblog.Application;
using Rhino.Commons.HttpModules;
using System.Threading;
using System.Globalization;

namespace KenEgozi.Com.Weblog
{
	public class Global : UnitOfWorkApplication
	{
		protected override IWindsorContainer CreateContainer(string windsorConfig)
		{
			IoCContainer container = new IoCContainer();
			container.Initialize();
			return container;
		}
		public override void Application_Start(object sender, EventArgs e)
		{
		}

		public override void UnitOfWorkApplication_BeginRequest(object sender, EventArgs e)
		{
			CultureInfo uk = new CultureInfo("en-GB");
			Thread.CurrentThread.CurrentCulture = uk;
			Thread.CurrentThread.CurrentUICulture = uk;
			base.UnitOfWorkApplication_BeginRequest(sender, e);

		}

		protected void Application_Error(object sender, EventArgs e)
		{
			//Server.ClearError();
			//Server.Transfer("~/Error.htm");
		}
	}
}